﻿@model Tecnosop.Dominio.CLIENTE
@{
    ViewBag.Title = "Añadir un nuevo cliente";
    Layout = "~/Views/Cliente/_LayoutCliente.cshtml";
}
@section script {
    @Content.Script(@Links.Scripts.rut_validator_js, Url)
}
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Agregar un cliente</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.RUT_CLIENTE)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RUT_CLIENTE)
            @Html.ValidationMessageFor(model => model.RUT_CLIENTE)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.REGION)
        </div>
        <div class="editor-field">
            @*@Html.DropDownList("REGION", String.Empty)*@
            @(Html.Telerik().DropDownList()
                .Name("REGION")
                .HtmlAttributes(new { style = "width: 300px;" })
        //.Items(item => item.Add().Text(String.Empty))
                .SelectedIndex(0)
                .BindTo(ViewBag.REGION)

            )
            @Html.ValidationMessageFor(model => model.REGION)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.NOMBRE)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.NOMBRE)
            @Html.ValidationMessageFor(model => model.NOMBRE)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DIRECCION)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DIRECCION)
            @Html.ValidationMessageFor(model => model.DIRECCION)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CUIDAD)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CUIDAD)
            @Html.ValidationMessageFor(model => model.CUIDAD)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.COMUNA)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.COMUNA)
            @Html.ValidationMessageFor(model => model.COMUNA)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.EMAIL)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.EMAIL)
            @Html.ValidationMessageFor(model => model.EMAIL)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TELEFONO_1)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TELEFONO_1)
            @Html.ValidationMessageFor(model => model.TELEFONO_1)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TELEFONO_2)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TELEFONO_2)
            @Html.ValidationMessageFor(model => model.TELEFONO_2)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.GIRO)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.GIRO)
            @Html.ValidationMessageFor(model => model.GIRO)
        </div>

        <br />
        <hr />
        <p>
            <button type="submit" class="nice radius small green button">Agregar</button>
            @Html.ActionLink("Cancelar", MVC.Cliente.VerTodos(), new { @class = "nice radius small red button" })
        </p>
    </fieldset>
}